#ifndef __TCP_DEMO_H
#define __TCP_DEMO_H
#include "types.h"
extern uint8  ID;            //收到的ID
extern uint8  KEY;           //收到的指令
extern uint8  LED1_5_IN;     //收到的5个灯
extern uint16 DISTANCE_IN;   //距离
extern uint8  ID_NEW;        //新的IP地址
extern uint8  ID_NOW;        //原来的ip地址
extern uint16 W5500_tcp_server_port;
extern char key_on;
extern char GPIO_BACK;
extern unsigned short LAST_DISTANCE; 
void do_tcp_server(void);     //TCP Server回环演示函数
void do_tcp_client(void);     //TCP Clinet回环演示函数
void do_tcp_server_USER(int a); //自定义数据处理函数
uint16 CRC_calculate_crc16(uint16 wCRCin,uint16 wCPoly,uint16 wResultXOR,char input_invert,char ouput_invert,unsigned char *puchMsg, int usDataLen);  //CRC16校验函数

void do_tcp_server_USART1_RX(void);
void do_tcp_server_USART2_RX(void);
void keep_alive(void);


#endif 

